﻿using System;

namespace BlamanticUI.Components;

/// <summary>
/// Represents the setting of toast.
/// </summary>
public class ToastSetting
{
    /// <summary>
    /// Gets or sets the key of container.
    /// </summary>
    public string Key { get; set; } = "Default";

    /// <summary>
    /// Gets or sets the title.
    /// </summary>
    public string Title { get; set; }
    /// <summary>
    /// Gets or sets the message.
    /// </summary>
    public string Message { get; set; }
    /// <summary>
    /// Gets or sets the icon class.
    /// </summary>
    public string IconClass { get; set; }
    /// <summary>
    /// Gets or sets the state.
    /// </summary>
    public State? State { get; set; }
    /// <summary>
    /// Gets or sets the color.
    /// </summary>
    public Color? Color { get; set; }
    /// <summary>
    /// Gets or sets a value indicating whether this <see cref="ToastSetting"/> is inverted.
    /// </summary>
    public bool Inverted { get; set; }

    /// <summary>
    /// Gets or sets the duration time to show toast,unit is second. Default is 2000 milliseconds.
    /// </summary>
    public int? ShowDuration { get; set; } = 2000;
    /// <summary>
    /// Gets or sets the duration time to hide toast,unit is second. Default is 2000 milliseconds.
    /// </summary>
    public int? HideDuration { get; set; } = 2000;

    /// <summary>
    /// Gets or sets the duration time of toast visibility, unit is second. Default is 3000 milliseconds.
    /// </summary>
    public int? VisibleDuration { get; set; } = 3000;

    ///// <summary>
    ///// Gets or sets the progress bar.
    ///// </summary>
    //public VerticalPosition? ProgressBar { get; set; }
    ///// <summary>
    ///// Gets or sets the color of the progress bar.
    ///// </summary>
    //public Color? ProgressBarColor { get; set; }
    ///// <summary>
    ///// Gets or sets the state of the progress bar.
    ///// </summary>
    //public State? ProgressBarState { get; set; }

    ///// <summary>
    ///// Gets or sets the progress bar increase direction. Default is <see cref="HorizontalPosition.Left"/>.
    ///// </summary>
    //public HorizontalPosition ProgressBarIncrease { get; set; } = HorizontalPosition.Left;

    ///// <summary>
    ///// Gets or sets the position of toast message to show.
    ///// </summary>
    //public DockPosition Position
    //{
    //    get => _position;
    //    set
    //    {
    //        _position = value;
    //        OnSettingChanged?.Invoke();
    //    }
    //}
    internal event Action OnSettingChanged;
}
